import React, { forwardRef, useImperativeHandle, useState } from "react";
import { ErrorBlock } from 'antd-mobile'
import empty from '@/assets/logo/empty.svg'; // 注意路径是否正确

const EmptyBlock = forwardRef((props, ref) => {
    const title = props.title || '暂无数据'
    const description = props.description || ''
    const height = props.height || '150px'
    const image = props.image || empty
    return (
        <ErrorBlock
            image={image}
            style={{ '--image-height': height, width: '100%',backgroundColor:'rgb(245, 245, 245)' }}
            title={title}
            description={description}
        >
        </ErrorBlock>
    )
});

export default EmptyBlock;